package com.zjgsu.nftplatform.pojo;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.util.Date;

/**
 * @author ahy231
 * @date 2021/12/1 11:13
 * @description
 */
@Data
public class PayCallback {
    private String id;
    private Date create_time;
    private String event_type;
    private String resource_type;
    private PayResource resource;
    private String summary;

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
            return e.getMessage();
        }
    }
}
